<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var flag = true;//布尔型
        var flag1 = false;//布尔型
        console.log(flag + 1);//2     true参与加法运算当1来看
        console.log(flag1 + 1);//1     false参与加法运算当0来看
    </script>
</head>

<body>

</body>

</html>